package com.zyong.design.pattern.responsibility.case5;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: zyong-design-pattern
 * @ClassName: Client
 * @author: zyong
 * @create: 2024-04-13 19:51
 */
public class Client {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext configApplicationContext =
                new AnnotationConfigApplicationContext("com.zyong.design.pattern.responsibility.case5");

        VerifyHandlerChain handlerChain = configApplicationContext.getBean(VerifyHandlerChain.class);

        List<Object> allObjectList = new ArrayList<>();
        allObjectList.add("AAAAA");
        allObjectList.add("BBBBB");
        allObjectList.add("CCCCC");

        List<Object> resultList = handlerChain.verifyAll(allObjectList);
        System.out.println("resultList = " + resultList);
    }
}
